package com.ruoyi.project.data.controller;

import com.ruoyi.framework.web.controller.BaseController;
import com.ruoyi.framework.web.domain.AjaxResult;
import com.ruoyi.project.data.domain.TradeRecords;
import com.ruoyi.project.data.service.IDatTradeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/system/trade")
public class DatTradeController extends BaseController {

    @Autowired
    private IDatTradeService iDatTradeService;
    @PreAuthorize("@ss.hasPermi('data:trade:list')")
    @GetMapping("/list")
    public AjaxResult list(TradeRecords tradeRecords) {
        TradeRecords tr = iDatTradeService.findTradeRecords(tradeRecords);
        return AjaxResult.success(tr);
    }
}
